/**
 * 
 */
package com.ms.game.itembox;

import java.io.Serializable;

import com.ms.service.error.ErrorCode;

/**
 * 變更道具時用來指定道具和數量的 class
 * 
 * @author TW15010
 */
public class ChangeItem implements Serializable {
	private static final long serialVersionUID = 7375650434807437528L;

	/**
	 * 道具id
	 */
	private String itemId;

	/**
	 * 道具序號
	 */
	private String itemSn;

	/**
	 * 變更數量，填絕對值<br>
	 * 要曾加 1 就填 1<br>
	 * 要扣 5 還是填 5
	 */
	private int changeCount = 0;

	/** 要變更的道具目前數量 */
	private int currentCount;
	
	/** 道具基本精煉等級*/
	private int itemRefineLevel;
	
	/** 精煉結束時間*/
	private int refineEndTime;

	/**
	 * 執行結果
	 * 
	 * @see ErrorCode
	 */
	private int result;

	/**
	 * 變更後的數量，等於 0 表示道具扣光要刪除
	 */
	private int newCount;
	
	public Item toItem(){
		Item item = new Item();
		item.setItemId(itemId);
		item.setSn(itemSn);
		item.setCount(changeCount);
		item.setRefineLevel(itemRefineLevel);
		item.setRefineEndTime(refineEndTime);
		return item;
	}

	public int getResult() {
		return result;
	}

	public void setResult(int result) {
		this.result = result;
	}

	public String getItemId() {
		return itemId;
	}

	public void setItemId(String itemId) {
		this.itemId = itemId;
	}

	public int getChangeCount() {
		return changeCount;
	}

	public void setChangeCount(int changeCount) {
		this.changeCount = changeCount;
	}

	public int getCurrentCount() {
		return currentCount;
	}

	public void setCurrentCount(int currentCount) {
		this.currentCount = currentCount;
	}

	public int getNewCount() {
		return newCount;
	}

	public void setNewCount(int newCount) {
		this.newCount = newCount;
	}

	public String getItemSn() {
		return itemSn;
	}

	public void setItemSn(String itemSn) {
		this.itemSn = itemSn;
	}

	public int getItemRefineLevel() {
		return itemRefineLevel;
	}

	public void setItemRefineLevel(int itemRefineLevel) {
		this.itemRefineLevel = itemRefineLevel;
	}

	public int getRefineEndTime() {
		return refineEndTime;
	}

	public void setRefineEndTime(int refineEndTime) {
		this.refineEndTime = refineEndTime;
	}
}
